<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/
defined('_JEXEC') or die('Restricted access'); 
global $option;

?>
<div class="content-right">
<form action="index.php?option=<?php echo $option;?>" method="post">
<input type="hidden" name="view" value="jatransactions">
<input type="hidden" name="submitsearch" value="submitsearch">
<?php if($this->hidden==0)
{
?>
<table>
<tr>
<td></td>
	<td>
	<input type="text" name="keyword" value="<?php echo $this->keyword;?>">
	</td>
	
	<td>
	<input type="submit" value="<?php echo JText::_('Go');?>">
	</td>
</tr>
</table>
<?php
}
?>
</form>
<br/>
<form action="index.php" method="post" name="adminForm">
<table class="adminlist">
<tr>
<td colspan="10">
<?php
echo JText::_('TRANSACTION SYSTEM');
?>
</td>
</tr>
<tr>
	<th>
	<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->lists);?>);" />
	</th>
	<th><?php echo JText::_('ID')?></th>
	<th><?php echo JText::_('CUSTOMER')?></th>
	<th><?php echo JText::_('AMOUNT')?></th>
	<th><?php echo JText::_('IPADDRESS')?></th>
	<th><?php echo JText::_('PRODUCT TYPE')?></th>
	<th><?php echo JText::_('DATE CREATED')?></th>
	<th><?php echo JText::_('View invoice')?></th>
</tr>
<?php 
for($i =0 ; $i<count($this->lists);$i++)
{
	$item =$this->lists[$i];
	$checked 	= JHTML::_('grid.id',   $i, $item->transaction_id );
?>
<tr class="alt1"> 
		 <td>
					<?php echo $checked; ?></td>
          <td nowrap="nowrap" align="center"><?php echo $item->transaction_id?></td>
          <td nowrap="nowrap"><a href="index.php?option=<?php echo $option;?>&view=jaemployers&task=user&cid[]=<?php echo $item->user_id?>"><?php echo $item->username ?></a></td>
          <td align="center"><?php echo $item->amount ; ?></td>
          <td align="center"><?php echo $item->ip?></td>
          <td align="nowrap"><?php echo $item->product_type ?></td>
          <td align="nowrap"><?php echo date("Y-m-d", $item->date);?></td>
          <td align="nowrap">
         <a href="index.php?option=<?php echo $option;?>&view=jatransactions&task=print_invoice&tranid=<?php echo $item->transaction_id?>">Invoice</a>
          </td>
 </tr>
 <?php
}
$page = $this->pagination;
?>
 <tfoot>
		<tr>
			<td colspan="13">
				<?php echo $page->getListFooter(); ?>
				<span style="float:right">
				
<?php echo $this->pagination->getResultsCounter();?><span style="padding: 0px 5px;"><strong><?php echo JText::_('Results')?></strong></span>
				</span>
			</td>
		</tr>
		</tfoot>
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="keyword" value="<?php echo $this->keyword;?>">
		<input type="hidden" name="type" value="<?php echo $this->type?>">
		<input type="hidden" name="option" value="<?php echo $option;?>" />
		<input type="hidden" name="userid" value="<?php echo $this->userid;?>">
<input type="hidden" name="task" value="" />
<input type="hidden" name="view" value="jatransactions" />
</form>
</table>
</div>